﻿#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
#include<string.h>
//double fact(double n);
int fact(int n);
//#define f(a,b,x) a*x+b
int main() {
	////.输人两个正整数m和n,求其最大公约数和最小公倍数
	//int m, n,max,i;
	//scanf("%d%d",&m,&n);
	//int x = m > n ? m : n;
	////求求最大公约数
	//for (i = 1; i < x; i++) {
	//	if (m % i == 0 && n % i == 0) {
	//		max = i;
	//	}
	//}
	////求最小公倍数
	//int min;
	//min = (m * n) / max;
	//printf("最大公约数：%d，最小公倍数:%d",max,min);

	//5.4.输人一行字符,分别统计出其中英文字母、空格、数字和其他字符的个数。
	/*int English = 0,  eng= 0, digilt = 0, other = 0;
	char o;
	while ((o = getchar()) != '\n') {
		if (o >= 'a' && o <= 'z'|| o >= 'A' && o <= 'Z') {
			English++;
		}
		else if (o == ' ') {
			eng++;
		}
		else if ((o >= '0') && (o <= '9')){
			digilt++;
	}
		else {
			other++;
		}
	}
	printf("%d %d %d %d", English, eng, digilt, other);*/
	
	//5.5求 S„=a+aa+aaa+…+a…a之值,其中a是一个数字,"表示a的位数,"由键盘输入。
	//int s=0, a,count,o;
	//scanf("%d %d",&a,&count);
	//o = a;
	//s = a;
	//while (count-1) {
	//	s = s + (a=a*10+o);
	//	count--;
	//}

	////5.6求1到20的阶乘
	/*double i, s = 1,j ,t=0;
	for (i = 1; i <= 20; i++) {
		s = 1;
		for (j = i; j > 0; j--) {
			s = s * j;
		}
		printf("%lf \n", s);
		t += s;
		}
	printf("\n%lf",t);*/

	/*double x, y;
	scanf("%lf",&x);
	if (x > 2) {
		printf("%lf",y=sin(2*x));
	}
	else if (x<1) {
		printf("%lf",y=3-x*x);
	}
	else if (x == 1) {
		printf("%lf",y=4+x);
	}*/
	
	/*int i, j,h;
	for (h = 1; h <= 5; h++) {
		for (i =5-h; i > 0; i--) {
			printf(" ");
		}
		for (j = 1; j <= h*2-1; j++) {
			printf("*");
		}
		printf("\n");
	}*/

	/*int a = 10, y = 12;
	if (a = 0)y--;
	else if (a > 0)
		y++; else y += y;
	printf("%d",y);*/
	
	/*int a[][4] = {1,2,3,4,5,6,7,8};
	int(*p)[4] = a;
	printf("%d",*(*(p+1)+2));*/
	//f(6,5,f(3,2,1)));

	//用递归写n！

	/*double n,result;
	scanf("%lf",&n);
	result=fact(n);
	printf("%lf",result);*/
	int n,result;
	scanf("%d",&n);
	result = fact(n);
	printf("%d",result);
	return 0;
}
int fact(int n) {
	if (n == 0)
		return 1;
	return n * fact(n - 1);
}
//double fact(double n) {
//	if (n == 0)
//		return 1;
//	return n * fact(n - 1);
//}